package com.sky.demo;

import com.sky.service.UserService;
import com.sky.service.impl.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import java.io.File;

public class UserServiceDemo {
    public static void main(String[] args) {
        FileSystemXmlApplicationContext app = new FileSystemXmlApplicationContext("D:\\Data\\ideaproject\\sky_spring_ioc\\src\\main\\resources\\applicationContext.xml");
        UserService service = (UserService) app.getBean("userService");
        service.save();
        app.close();
    }
}
